home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 151-175 / disk_166 / stevie / bugs / bug1 / cmdline.c.diff next >
Text File  |  1992-05-06  |  1KB  |  53 lines

  1. 4a5
  2. >  * further   modifications by:  Robert Regn       rtregn@faui32.uucp
  3. 158d158
  4. <                 UNCHANGED;
  5. 273c273
  6. <     if ( strcmp(cmd,"set")==0 ) {
  7. ---
  8. >     if ( strncmp(cmd,"set", 2)==0 ) {
  9. 480a481,483
  10. >         if (altfile)
  11. >             free(altfile);
  12. >         altfile = strsave(arg);
  13. 503a507,523
  14. >         } else
  15. >           if (strchr(arg, '%')) {
  16. >             char *s, *buf=alloc(strlen(arg)+strlen(Filename));
  17. >             if (Filename == NULL) {
  18. >                 emsg("No filename");
  19. >                 return FALSE;
  20. >             }
  21. >             s = strchr(arg, '%');
  22. >             *s = 0;
  23. >             strcpy (buf, arg);
  24. >             strcat (buf, Filename);
  25. >             strcat (buf, s+1);
  26. >             if (altfile)        /* I'm not shure if it is ok */
  27. >                 free(altfile);
  28. >             altfile = Filename;
  29. >             altline = cntllines(Filemem, Curschar);
  30. >             Filename = buf;
  31. 504a525,526
  32. >             if (altfile)        /* I'm not shure if it is ok */
  33. >                 free(altfile);
  34. 530a553
  35. > #ifndef MINIX
  36. 548a572
  37. > #endif
  38. 555d578
  39. <     int n;
  40. 608c631
  41. <     } while (c != '\r' && c != '\n');
  42. ---
  43. >     } while (c != '\r' && c != '\n' && c != ' ' && c != ':');
  44. 610c633,638
  45. <     screenclear();
  46. ---
  47. >     if ( c == ':') {                /* this can vi too  */
  48. >         outstr("\n");
  49. >         readcmdline(c, NULL);
  50. >     }
  51. >     else
  52. >         screenclear();
  53.